\section{Benefits of our method}
\label{sec-benefits}
 
As already mentioned in \refSec{sec-our-technique-parsing-clauses},
the main advantage of our technique is that it allows for a
\emph{modular} structure of the \texttt{loop} implementation.

\mitloop{} has extension capabilities as well, through the use of
so-called \emph{loop universes}.  A loop universe is a structure
instance that contains information on how to parse and translate all
loop constructs.  The ease with which an extension can be added
depends on how well the extension fits into the framework provided.
It is relatively easy to provide an additional keyword for a
\texttt{for \emph{var} being ...}, but it would be much more difficult
to allow for a clause like \texttt{when \emph{form} is-a \emph{type}
  ...} to take but one example.

Furthermore, since \mitloop{} does not use generic functions,
customizing existing behavior by extending existing methods for
processing \texttt{loop} elements such as clauses is not an option.

The most immediate consequence of this improved modularity is that the
code is easier to maintain than a monolithic code for the same
purpose.  A modification in one module is less likely to break other
modules.

This modularity also makes it very simple for additional clause types
to be added by the \commonlisp{} implementation, such as the extension
for iterating over the user-extensible sequences described by Rhodes
in his paper on user-extensible sequences
\cite{Rhodes:2007:USC:1622123.1622138}.  This extension defines the
new \texttt{loop} keywords \texttt{element} and \texttt{elements} for
this purpose.

Furthermore, since the parsing technology we use does not require any
costly pre-processing, extensions could be added by client code on a
per-module basis, rather than as a permanent extension.  Then, client
code can maintain the capacity of detecting non-conforming constructs
in most code, while allowing for selected extensions in specific
modules.

As a consequence of this additional modularity, we think it is
feasible to avoid the current problem of derivatives of \mitloop{},
namely that each implementation has had to introduce modifications to
the single file that contains the code.  With better modularity, we
think it is possible to maintain the code for the \texttt{loop} macro
as a separate entity, with each \commonlisp{} implementation supplying
modifications in separate, small modules.  Such a common code base
would reduce the total maintenance cost for all \commonlisp{}
implementations using this code base.
